#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
#include <signal.h>

#ifdef WIN32
	#pragma comment(lib, "ws2_32.lib")
	#include <Winsock.h>
	#include <Windows.h>

	typedef unsigned long (__stdcall * THREADFUNC)(void *);
	typedef int SOCKLEN_T;
	#define USLEEP Sleep
#else
	#include <sys/socket.h>
	#include <arpa/inet.h>
	#include <pthread.h>

	typedef void* (*THREADFUNC)(void *);
	typedef int SOCKET;
	typedef pthread_t DWORD;
	typedef struct sockaddr_in SOCKADDR_IN;
	typedef struct sockaddr SOCKADDR;
	typedef socklen_t SOCKLEN_T;
	#define USLEEP usleep
#endif

